///////////////////////////////////////////////////////////////////////////////
// File:        RealmdStruct.hpp
// Author:      671643387@qq.com
// Description: 
///////////////////////////////////////////////////////////////////////////////

#if !defined(REALMD_REALMDSTRUCT_HPP_)
#define REALMD_REALMDSTRUCT_HPP_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

#include <cstdint>

///////////////////////////////////////////////////////////////////////////////
#if defined( __GNUC__ )
#pragma pack(1)
#else
#pragma pack(push,1)
#endif

typedef struct AUTH_LOGON_CHALLENGE_C
{
    uint8_t     cmd;
    uint8_t     error;
    uint16_t    size;
    uint8_t     gamename[4];
    uint8_t     version1;
    uint8_t     version2;
    uint8_t     version3;
    uint16_t    build;
    uint8_t     platform[4];
    uint8_t     os[4];
    uint8_t     country[4];
    uint32_t    timezone_bias;
    uint32_t    ip;
    uint8_t     I_len;
    uint8_t     I[1];
}sAuthLogonChallenge_C;

typedef struct AUTH_LOGON_PROOF_C
{
    uint8_t     cmd;
    uint8_t     A[32];
    uint8_t     M1[20];
    uint8_t     crc_hash[20];
    uint8_t     number_of_keys;
    uint8_t     securityFlags;
} sAuthLogonProof_C;

typedef struct AUTH_LOGON_PROOF_S_BUILD_6005
{
    uint8_t     cmd;
    uint8_t     error;
    uint8_t     M2[20];
    // uint32  unk1;
    uint32_t     unk2;
    // uint16  unk3;
} sAuthLogonProof_S_BUILD_6005;

typedef struct AUTH_RECONNECT_PROOF_C
{
    uint8_t     cmd;
    uint8_t     R1[16];
    uint8_t     R2[20];
    uint8_t     R3[20];
    uint8_t     number_of_keys;
} sAuthReconnectProof_C;

#if defined( __GNUC__ )
#pragma pack()
#else
#pragma pack(pop)
#endif

///////////////////////////////////////////////////////////////////////////////

#endif //REALMD_REALMDSTRUCT_HPP_
